package guice.boot.archive.bootstrap;

import guice.boot.archive.spi.archive.ExecutableArchive;

/**
 * {@link Launcher} for JAR based archives. This launcher assumes that dependency jars are
 * included inside a {@code /SOFA-ARK/container/lib} directory and that application fat jar
 * are included inside a {@code /SOFA-ARK/biz/} directory and that ark plugin fat jar are included
 * inside a {@code /SOFA-ARK/plugin/} directory
 *
 * @author qilong.zql
 * @since 0.1.0
 */
public class ArchiveLauncher extends ExecutableArchiveLauncher {

    public final String SOFA_ARK_MAIN = "com.alipay.sofa.ark.container.ArkContainer";

    public ArchiveLauncher() {
    }

    public ArchiveLauncher(ExecutableArchive executableArchive) {
        super(executableArchive);
    }

    public static void main(String[] args) throws Exception {
        new ArchiveLauncher().launch(args);
    }

    @Override
    protected String getMainClass() {
        return SOFA_ARK_MAIN;
    }
}